﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PPP.ViewModel.BaseModel  {    
    /// <summary>
    /// A base ViewModel for dockable toolbox content. 
    /// 
    /// <list type="bullet">
    /// <item>
    /// <term>Author</term>
    /// <description>Sebastian Will</description>
    /// </item>
    /// </list>
    /// 
    /// </summary>    
    public class ToolViewModel : PaneViewModel {

        #region Fields

        /// <summary>
        /// The name of the dockable toolbox content.
        /// </summary>
        private string _name = String.Empty;

        /// <summary>
        /// The visivle state of the dockable toolbox content.
        /// </summary>
        private bool _isVisible = true;

        #endregion

        #region Consts
        #region PropertyName Consts

        /// <summary>
        /// The <see cref="IsVisible" /> property's name.
        /// </summary>
        public const string IsVisiblePropertyName = "IsVisible";

        #endregion
        #endregion

        #region Properties

        /// <summary>
        /// Gets the Name property.        
        /// </summary>
        public string Name {
            get { return _name; }
            private set {
                if (_name != value)
                    _name = value;
            }
        }

        /// <summary>
        /// Gets the IsVisible property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public bool IsVisible {
            get { return _isVisible; }
            set {
                if (_isVisible != value) {
                    _isVisible = value;
                    RaisePropertyChanged("IsVisible");
                }
            }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the ToolViewModel class.
        /// </summary>
        public ToolViewModel(string name) {
            Name = name;
            Title = name;
        }

        #endregion
              
    }
}